package com.usian.feign;

import com.usian.pojo.SearchItem;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("usian-search-service")
public interface SearchItemFeign {
    /**
     * 首页导入
     * @return
     */
    @RequestMapping("/importAll")
    public boolean importAll();

    /**
     * 查询商品信息
     * @param q
     * @param page
     * @param pageSize
     * @return
     */
    @RequestMapping("/list")
    public List<SearchItem> selectByQ(@RequestParam String q, @RequestParam(defaultValue = "1")Long page,
                                      @RequestParam(defaultValue = "10")Integer pageSize);
}
